// 防抖
export function debounce(fun, delay) {
  return function(args) {
    const that = this
    const _args = args
    clearTimeout(fun.id)
    fun.id = setTimeout(function() {
      fun.call(that, _args)
    }, delay)
  }
}
